package 简单工厂;

// 简单工厂类
public class SimpleFactory {
	public Pizza createPizza(String type) {
		System.out.println("使用简单工厂模式");
		Pizza pizza = null;
		
		if(type.equals("cheese")) {
			pizza = new CheesePizza();
			pizza.setName("cheese");
		}
		
		return pizza;
	}
}
